/*
package com.bistu.sim.xwy.news.BusinessMode;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.bistu.sim.xwy.news.R;
import com.bistu.sim.xwy.news.UserMode.MineActivity;
import com.bistu.sim.xwy.news.UserMode.ResetIconActivity;
import com.bistu.sim.xwy.news.UserMode.ResetInfoActivity;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;
import com.loopj.android.image.SmartImageView;

import org.apache.http.Header;

import javax.sql.StatementEvent;

public class BusInfoResetActivity extends AppCompatActivity implements View.OnClickListener {

    private TextView bus_user_name;
    private TextView bus_user_sex;
    private TextView bus_user_tel;
    private TextView bus_user_work;
    private TextView bus_user_mail;
    private TextView bus_user_manage;
    private TextView bus_user_place;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bus_resetinfo);
        initView();
    }

    public void initView() {
        String bus_name = getIntent().getExtras().getString("bus_name");
        String bus_tel = getIntent().getExtras().getString("bus_tel");
        String bus_sex = getIntent().getExtras().getString("bus_gender");
        String bus_mail = getIntent().getExtras().getString("bus_mail");
        String bus_work = getIntent().getExtras().getString("bus_work");
        String bus_icon = getIntent().getExtras().getString("bus_icon");
        String bus_manage = getIntent().getExtras().getString("bus_manage");
        String bus_place = getIntent().getExtras().getString("bus_place");

        SmartImageView bus_user_icon = findViewById(R.id.bus_icon);
        bus_user_name = findViewById(R.id.bus_user_name);
        bus_user_sex = findViewById(R.id.bus_user_sex);
        bus_user_tel = findViewById(R.id.bus_user_tel);
        bus_user_work = findViewById(R.id.bus_user_work);
        bus_user_mail = findViewById(R.id.bus_user_mail);
        bus_user_manage = findViewById(R.id.bus_manage_type);
        bus_user_place = findViewById(R.id.bus_place_type);

        RelativeLayout re_bus_avater = findViewById(R.id.re_bus_avatar);
        Button tv_cancel = findViewById(R.id.tv_cancel);
        Button tv_btn = findViewById(R.id.tv_btn);

        bus_user_name.setText(bus_name);
        bus_user_sex.setText(bus_sex);
        bus_user_tel.setText(bus_tel);
        bus_user_mail.setText(bus_mail);
        bus_user_work.setText(bus_work);
        bus_user_manage.setText(bus_manage);
        bus_user_place.setText(bus_place);

        bus_user_icon.setImageUrl(bus_icon, R.drawable.ic_launcher, R.drawable.ic_launcher);
        tv_btn.setOnClickListener(this);
        tv_cancel.setOnClickListener(this);
        re_bus_avater.setOnClickListener(this);

    }

    */
/*public void ResetInfo(){
        String user_name = tv_name.getText().toString().trim();
        String user_tel = tv_dianhua.getText().toString().trim();
        String user_gender = tv_sex.getText().toString().trim();
        String user_mail=tv_youxiang.getText().toString().trim();
        String user_work=tv_danwei.getText().toString().trim();

        *//*
*/
/*String manageType = findViewById(R.id.bus_manage_type);
        String placeType = findViewById(R.id.bus_place_type);

        String[] arr1 = {"餐饮服务", "零售业", "服装与时尚", "健康与美容", "家居与家具", "电子产品与科技", "娱乐与休闲", "旅游与酒店", "教育与培训", "金融与保险"};
        String[] arr2 = {"实体店铺", "多品牌连锁店", "单品牌专卖店", "路边摊/流动摊贩", "在线电商平台", "餐车/移动餐饮", "旅游景区内商户", "虚拟商户", "农贸市场/集贸市场", "专业市场/批发市场"};
        ArrayAdapter<String> adapter1 = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, arr1);
        ArrayAdapter<String> adapter2 = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, arr2);

        manageType.setAdapter(adapter1);
        placeType.setAdapter(adapter2);

        manageType.setOnItemSelectedListener(this);
        placeType.setOnItemSelectedListener(this);


        @Override
        public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
            String selectedBusinessType = parent.getItemAtPosition(position).toString();

        }
        @Override
        public void onNothingSelected(AdapterView<?> parent) {
            // 未选择任何项时的处理逻辑
        }*//*
*/
/*


        if(TextUtils.isEmpty(user_name)){
            Toast.makeText(this,"用户名不能为空",Toast.LENGTH_SHORT).show();
            return;
        }
        if(TextUtils.isEmpty(user_tel)){
            Toast.makeText(this,"电话不能为空",Toast.LENGTH_SHORT).show();
            return;
        }


        String url = getString(R.string.serverurl)+"user/resetInfo";
        AsyncHttpClient client = new AsyncHttpClient();
        RequestParams params = new RequestParams();
        params.put("user_name",user_name);
        params.put("user_tel",user_tel);
        params.put("user_gender",user_gender);
        params.put("user_mail",user_mail);
        params.put("user_work",user_work);
        client.post(url, params,new AsyncHttpResponseHandler() {
            @Override
            public void onSuccess(int i, Header[] headers, byte[] bytes) {
                try {
                    Toast.makeText(ResetInfoActivity.this,"修改信息成功",Toast.LENGTH_SHORT).show();
                    Intent intent = new Intent(ResetInfoActivity.this, MineActivity.class);
                    startActivity(intent);
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
            @Override
            public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) {
                Toast.makeText(ResetInfoActivity.this,"错误,请检查网络",Toast.LENGTH_SHORT).show();
            }
        });

    }*//*


    */
/*public void onClick(View v) {
        switch (v.getId()){
            case R.id.tv_cancel:
                finish();
                break;
            case R.id.tv_btn:
                ResetInfo();
                break;
            case R.id.re_avatar:
                Intent intent = new Intent(this, ResetIconActivity.class);
                String user_tel = getIntent().getExtras().getString("user_tel");
                intent.putExtra("user_tel", user_tel);
                startActivity(intent);
                break;
        }
    }*//*

}

*/
